Xfail NaN <-> NaT tests on non-x86 and warn on cast
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sun, 26 Jun 2022 14:06:07 +0000 (15:06 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Sun, 26 Jun 2022 14:06:07 +0000 (15:06 +0100)
commitfbc6c9a8a008c382a953bdb27a475b1a379cdc67
tree4d0e768aa9d61694d8f4ef33dd8797dba9f4f1d8
parent9f84658dc898c6427710ffa514f4eb22e1e5b9ac
Xfail NaN <-> NaT tests on non-x86 and warn on cast

pd.Series([np.nan]).astype('datetime64[ns]')[0] = pd.NaT on x86
but 1970-01-01 on arm* because float NaN -> int is undefined:
https://github.com/numpy/numpy/issues/8325
https://github.com/pandas-dev/pandas/issues/17792
https://github.com/pandas-dev/pandas/issues/26964

On s390x it's the maximum _positive_ value (2**63-1 ns = year 2262)

On riscv64 one test case raises an exception
(though I suspect not the general case since there aren't more).

Author: Andreas Tille <tille@debian.org>, Graham Inggs <ginggs@debian.org>, Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/877754
Forwarded: no

Gbp-Pq: Name xfail_tests_nonintel_nannat.patch
pandas/core/dtypes/cast.py
pandas/tests/dtypes/cast/test_downcast.py
pandas/tests/frame/indexing/test_where.py
pandas/tests/frame/test_reductions.py
pandas/tests/indexes/datetimes/test_datetime.py
pandas/tests/reductions/test_reductions.py
pandas/tests/series/test_constructors.py
pandas/tests/test_algos.py
pandas/tests/tools/test_to_datetime.py